Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't let clients cache the dev server's responses #1462

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

squarejesse
Copy link
Contributor

Closes: #1461

request = NSMutableURLRequest(nsUrl).apply {
request = NSMutableURLRequest(
uRL = nsUrl,
cachePolicy = NSURLRequestUseProtocolCachePolicy,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This says ‘follow HTTP caching headers’. It’s the default but I prefer to make it explicit

request = NSMutableURLRequest(
uRL = nsUrl,
cachePolicy = NSURLRequestUseProtocolCachePolicy,
timeoutInterval = 60.0,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also the default, and I must specify it manually to use the 3-arg version of this constructor

@squarejesse squarejesse merged commit 75e9827 into trunk Nov 14, 2024
6 checks passed
@squarejesse squarejesse deleted the jwilson.1113.caching branch November 14, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Development server’s manifest cached too long by NSURLSession
2 participants